<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>转移字符</title>
	<script>
		var str = "1 I said \"Hello World\"!";
		console.log(str);

		var str = "2 I said \'Hello World\'!";
		console.log(str);

		// 双引号表示' 不用转义
		var str = "3 I said 'Hello World' !";
		console.log(str);

		var str = "4 I said \r\nHello World!";
		console.log(str);

		// 用单引号表示字符串
		var str = '5 I said \r\nHello World!';
		console.log(str);

		// 单引号表示" 不用转义
		var str = '6 I said "Hello World" !';
		console.log(str);
		
		console.log("I said 'Hello Woeld '!");
		
		console.log("中\r\n国");

	</script>
</head>
<body>
	
</body>
</html>